﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
    <style type="text/css">
        body
        {
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        }
        h1
        {
            color: #0066CC;
        }
        h2
        {
            color: #00246F;
        }
        table, th, td
        {
            border: 1px solid black;
            border-collapse: collapse;
            text-align: left;
        }
    </style>
</head>
<body>

    <h1>
        Building resiprocate with Visual Studio</h1>
    <h2>
        Dependencies</h2>
    <h3>
        Visual Studio 2019
    </h3>
    <p>
        Most dependencies are now acquired using vcpkg. If you don't have it already, get 
        vcpkg from the <a href="https://github.com/microsoft/vcpkg">vcpkg GitHub page</a>. 
        The quick start guide in their readme is pretty good, so should have you up and 
        running in no time.
    </p>
    <p>
        Dependent on what sub-projects of resiprocate you would like to build, you may 
        need to install the following packages:
    </p>
    <ul>
        <li>asio</li>
        <li>berkeleydb</li>
        <li>boost</li>
        <li>cppunit</li>
        <li>openssl</li>
        <li>pcre</li>
    </ul>
    <p>
        Visual Studio project Platforms and Configurations map to vcpkg target triplets 
        as follows:
    </p>
    <table>
        <tr>
            <th>Platform</th>
            <th>Configuration</th>
            <th>Target Triplet</th>
        </tr>
        <tr>
            <td rowspan="6">Win32</td>
            <td>Debug</td>
            <td rowspan="4">x86-windows</td>
        </tr>
        <tr><td>Release</td></tr>
        <tr><td>Debug-SSL</td></tr>
        <tr><td>Release-SSL</td></tr>
        <tr>
            <td>Debug-SSL-MT</td>
            <td rowspan="2">x86-windows-static</td>
        </tr>
        <tr><td>Release-SSL-MT</td></tr>
        <tr>
            <td rowspan="6">x64</td>
            <td>Debug</td>
            <td rowspan="4">x64-windows</td>
        </tr>
        <tr><td>Release</td></tr>
        <tr><td>Debug-SSL</td></tr>
        <tr><td>Release-SSL</td></tr>
        <tr>
            <td>Debug-SSL-MT</td>
            <td rowspan="2">x64-windows-static</td>
        </tr>
        <tr><td>Release-SSL-MT</td></tr>
    </table>
    <h3>
        Visual Studio 2017 and older
    </h3>
    <p>
        When checked out from SVN, all dependent libraries are included with one 
        exception: You need to download openSSL. You can either download the source and 
        build it or download the precompiled binaries from
        <a href="http://slproweb.com/products/Win32OpenSSL.html">
        http://slproweb.com/products/Win32OpenSSL.html</a>. You need to download the 
        full versions, the light versions are not sufficient. If you want to build for 
        x64 you need to download the x64 version. </p>
    <p>
        Please note that the x64 version can be installed on x64 machines, but you can 
        copy the install folder to a 32bit system and cross-compile for x64. The openssl 
        install folders need to be renamed and put at the following locations:</p>
    <ul>
            <li>Solution Folder<ul>
                <li>contrib<ul>
                    <li>openssl (for Win32)</li>
                    <li>opensslx64 (for x64)</li>
                    </ul>
                </li>
                </ul>
            </li>
            </ul>
    <p>
        Additionally, in order to compile reTurn, it is required to have boost in the 
        contrib\boost folder.</p>
    <h2>
        Configurations and Platforms</h2>
    <p>
        There are eight possible configuration/platform combinations: SSL/non-SSL * 
        Debug/Release * x86/x64 = 8</p>
    <p>
        The output of all projects is created in a single folder for each 
        configuration/platform combinations. The output is organized as follows:
    </p>
    <ul>
        <li>&nbsp;Solution Folder<ul>
            <li>Win32<ul>
                <li>Debug</li>
                <li>Release</li>
                <li>SSL-Debug</li>
                <li>SSL-Release</li>
                </ul>
            </li>
            <li>X64<ul>
                <li>Debug</li>
                <li>Release</li>
                <li>SSL-Debug</li>
                <li>SSL-Release </li>
                </ul>
            </li>
            </ul>
        </li>
    </ul>
    <h2>
        Batch Builds</h2>
    <p>
        The Visual Studio Batch Build feature does not work with the current 
        configuration. This is due to a bug in Visual Studio 2010 when project 
        references are used. It could be solved by removing project references, adding 
        project dependencies instead and specifying all generated import libraries 
        directly in the linker configuration. This would practically resemble the way 
        this was done in pre-VS10 environments, but it would involve a bit of 
        configuration work.</p>
    <p>
        More info on this bug can be found here:</p>
    <ul>
        <li><a href="http://connect.microsoft.com/VisualStudio/feedback/details/636636/batch-build-does-not-work-as-expected">
            http://connect.microsoft.com/VisualStudio/feedback/details/636636/batch-build-does-not-work-as-expected</a></li>
        <li><a href="http://connect.microsoft.com/VisualStudio/feedback/details/633270/link-library-dependencies-for-c-does-not-work-with-batch-build">
            http://connect.microsoft.com/VisualStudio/feedback/details/633270/link-library-dependencies-for-c-does-not-work-with-batch-build</a></li>
        <li><a href="http://qualapps.blogspot.de/2010/04/static-library-dependencies-in-visual.html">
            http://qualapps.blogspot.de/2010/04/static-library-dependencies-in-visual.html</a></li>
    </ul>
    <p>
        &nbsp;</p>

</body>
</html>
